/*
 * Selling Partner API for Orders
 *
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.orders.v0
{
    /// <summary>
    /// The verification status of the order, along with associated approval or rejection metadata.
    /// </summary>
    [DataContract(Name = "RegulatedOrderVerificationStatus")]
    public partial class RegulatedOrderVerificationStatus : IValidatableObject
    {

        /// <summary>
        /// Gets or Sets Status
        /// </summary>
        [DataMember(Name = "Status", IsRequired = true, EmitDefaultValue = true)]
        public VerificationStatus Status { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="RegulatedOrderVerificationStatus" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected RegulatedOrderVerificationStatus() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="RegulatedOrderVerificationStatus" /> class.
        /// </summary>
        /// <param name="status">status (required).</param>
        /// <param name="requiresMerchantAction">When true, the regulated information provided in the order requires a review by the merchant. (required).</param>
        /// <param name="validRejectionReasons">A list of valid rejection reasons that may be used to reject the order&#39;s regulated information. (required).</param>
        /// <param name="rejectionReason">rejectionReason.</param>
        /// <param name="reviewDate">The date the order was reviewed. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format..</param>
        /// <param name="externalReviewerId">The identifier for the order&#39;s regulated information reviewer..</param>
        /// <param name="validVerificationDetails">A list of valid verification details that may be provided and the criteria required for when the verification detail can be provided..</param>
        public RegulatedOrderVerificationStatus(VerificationStatus status = default(VerificationStatus), bool requiresMerchantAction = default(bool), List<RejectionReason> validRejectionReasons = default(List<RejectionReason>), RejectionReason rejectionReason = default(RejectionReason), string reviewDate = default(string), string externalReviewerId = default(string), List<ValidVerificationDetail> validVerificationDetails = default(List<ValidVerificationDetail>))
        {
            this.Status = status;
            this.RequiresMerchantAction = requiresMerchantAction;
            // to ensure "validRejectionReasons" is required (not null)
            if (validRejectionReasons == null)
            {
                throw new ArgumentNullException("validRejectionReasons is a required property for RegulatedOrderVerificationStatus and cannot be null");
            }
            this.ValidRejectionReasons = validRejectionReasons;
            this.RejectionReason = rejectionReason;
            this.ReviewDate = reviewDate;
            this.ExternalReviewerId = externalReviewerId;
            this.ValidVerificationDetails = validVerificationDetails;
        }

        /// <summary>
        /// When true, the regulated information provided in the order requires a review by the merchant.
        /// </summary>
        /// <value>When true, the regulated information provided in the order requires a review by the merchant.</value>
        [DataMember(Name = "RequiresMerchantAction", IsRequired = true, EmitDefaultValue = true)]
        public bool RequiresMerchantAction { get; set; }

        /// <summary>
        /// A list of valid rejection reasons that may be used to reject the order&#39;s regulated information.
        /// </summary>
        /// <value>A list of valid rejection reasons that may be used to reject the order&#39;s regulated information.</value>
        [DataMember(Name = "ValidRejectionReasons", IsRequired = true, EmitDefaultValue = true)]
        public List<RejectionReason> ValidRejectionReasons { get; set; }

        /// <summary>
        /// Gets or Sets RejectionReason
        /// </summary>
        [DataMember(Name = "RejectionReason", EmitDefaultValue = false)]
        public RejectionReason RejectionReason { get; set; }

        /// <summary>
        /// The date the order was reviewed. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format.
        /// </summary>
        /// <value>The date the order was reviewed. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date time format.</value>
        [DataMember(Name = "ReviewDate", EmitDefaultValue = false)]
        public string ReviewDate { get; set; }

        /// <summary>
        /// The identifier for the order&#39;s regulated information reviewer.
        /// </summary>
        /// <value>The identifier for the order&#39;s regulated information reviewer.</value>
        [DataMember(Name = "ExternalReviewerId", EmitDefaultValue = false)]
        public string ExternalReviewerId { get; set; }

        /// <summary>
        /// A list of valid verification details that may be provided and the criteria required for when the verification detail can be provided.
        /// </summary>
        /// <value>A list of valid verification details that may be provided and the criteria required for when the verification detail can be provided.</value>
        [DataMember(Name = "ValidVerificationDetails", EmitDefaultValue = false)]
        public List<ValidVerificationDetail> ValidVerificationDetails { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class RegulatedOrderVerificationStatus {\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  RequiresMerchantAction: ").Append(RequiresMerchantAction).Append("\n");
            sb.Append("  ValidRejectionReasons: ").Append(ValidRejectionReasons).Append("\n");
            sb.Append("  RejectionReason: ").Append(RejectionReason).Append("\n");
            sb.Append("  ReviewDate: ").Append(ReviewDate).Append("\n");
            sb.Append("  ExternalReviewerId: ").Append(ExternalReviewerId).Append("\n");
            sb.Append("  ValidVerificationDetails: ").Append(ValidVerificationDetails).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
